// 管理所有与登录相关的接口
import {
  http
} from "@/utils/http";

// 用户手机号注册
export const getIndexLogin = (data) => {
  return http({
    url: "/logon",
    method: "GET",
    data,
  });
};
// 手机号注册获取验证码
export const getIphoneYzm = (data) => {
  return http({
    url: "/logon/sendCode",
    method: "GET",
    data,
  });
};
// 账号密码登录
export const getLogin = (data) => {
  return http({
    url: "/login",
    method: "GET",
    data,
  });
};
// 手机号登录 
export const getIphoneLogin = (data) => {
  return http({
    url: "/loginByCode",
    method: "GET",
    data,
  });
};
// 忘记密码
export const coverPassword = (data) => {
  return http({
    url: '/coverPassword',
    headers: {
      "Content-Type": "multipart/form-data",
    },
    method: 'post',
    data
  })
}
// 获取用户信息
export const getIphoneInfo = () => {
  return http({
    url: "/info",
    method: "GET",
  });
};

// 修改头像接口
export const updateIphoneInfo = (data) => {
  return http({
    url: "/user/updateImage",
    method: "POST",
    data,
  });
};
// 修改密码 
export const updatechangePassword = (data) => {
  return http({
    url: "/user/changePassword",
    method: "POST",
    data,
  });
};
// 退出登录
export const settinglongin = (data) => {
  return http({
    url: '/logout',
    method: 'GET',
    data
  })
}
// 用户提现
export const withdrawadd = (data) => {
  return http({
    url: '/ys/withdraw/add',
    method: 'POST',
    data
  })
}
// 用户提现记录
export const withdrawQueryPage = (data) => {
  return http({
    url: '/ys/withdraw/queryPage',
    method: 'GET',
    data
  })
}
// 用户提现详情 
export const withdrawXQ = (data) => {
  return http({
    url: '/ys/withdraw/queryId',
    method: 'GET',
    data
  })
}